#!/bin/sh
service redis-server restart;
service mongodb restart;
service mysql restart;
service guacd restart;
/etc/init.d/celeryd stop;
/etc/init.d/celerybeat stop;
export PYTHONOPTIMIZE=1;
/etc/init.d/celeryd start;
/etc/init.d/celerybeat start;
count=$(ps -ef|grep manage.py|grep v|awk '{print $2}')
echo $count;
if [ -n "$count" ];then
kill -9 $(ps -ef|grep manage.py|grep v|awk '{print $2}')
fi
cd /home/ops;
rm -rf djo.out;
nohup python manage.py runserver 127.0.0.1:8000 >djo.out 2>&1 &
sleep 10;
service nginx restart;
